﻿<%@ Page Language="C#" MasterPageFile="~/FrameMasterPage.master" AutoEventWireup="true" CodeFile="preventiveAdd.aspx.cs" Inherits="preventiveAdd" Title="Untitled Page" %>
<%@ Register Assembly="EclipseWebSolutions.DatePicker" Namespace="EclipseWebSolutions.DatePicker"
    TagPrefix="ews" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="m_contentBody" Runat="Server">
<asp:Panel ID="pnlBody" runat="server" >
<table  class="GridItem" cellspacing="2" cellpadding="2" style="width:auto; height:auto;">
    
    <tr>
    <td align="center" valign="top">
    
                      <table>
                        <tr><td colspan="2" class="BigLabelLeftAlign"><asp:Label ID="lblCodeNumber" runat="server" Text="Label" ></asp:Label>
                            <br /><br /></td></tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                System<asp:Label ID="Label2" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td align="left">
                               
                    
                       
                       <asp:UpdatePanel ID="updatePanel1" runat="server"><ContentTemplate>
                        <asp:DropDownList ID="drlSystem" runat="server" Height="25px" 
                          Width="180px" AppendDataBoundItems="True" DataSourceID="odsSystem" 
                          DataTextField="SystemLabel" DataValueField="SystemId" AutoPostBack="True">
                                    <asp:ListItem Value="-1">--- Choose a system ---</asp:ListItem>
                        </asp:DropDownList>
                        <asp:ObjectDataSource ID="odsSystem" runat="server" 
                          SelectMethod="GetSystems" TypeName="Service.ReferenceDataService">
                        </asp:ObjectDataSource>
                      </ContentTemplate> </asp:UpdatePanel>
                       
                               
                               
                       
                                </td>
                            
                            
                        </tr>
                          <tr>
                            <td align="left" style="width: 165px">
                                Equipment type<asp:Label ID="Label3" runat="server" ForeColor="Red" Text="*"></asp:Label>
                              </td>
                            <td align="left">
                               
                       
                                 
                    <asp:UpdatePanel ID="updatePanel2" runat="server"><ContentTemplate>
                        <asp:DropDownList ID="drlEquipmentType" runat="server" Height="20px" 
                          Width="180px" DataSourceID="odsEquipmentType" 
                          DataTextField="typeequipment" DataValueField="typeequipementid" AutoPostBack="True" 
                          >
                                        <asp:ListItem Value="-1">--- Choose an equipment type ---</asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:ObjectDataSource ID="odsEquipmentType" runat="server" 
                          SelectMethod="GetEquipmentSystemEquipmentType" TypeName="ReferenceDataDirectService" 
                                        >
                                        <SelectParameters>
                                            <asp:ControlParameter ControlID="drlSystem" Name="systemId" 
                                                PropertyName="SelectedValue" Type="Int32" />
                                        </SelectParameters>
                                    </asp:ObjectDataSource>
                    </ContentTemplate> </asp:UpdatePanel></td>
                           
                            
                          </tr>
                          <tr>
                            <td align="left" style="width: 165px">
                                Building 
                                <asp:Label ID="Label4" runat="server" ForeColor="Red" Text="*"></asp:Label>
                              </td>
                            <td align="left">
                            <asp:DropDownList ID="drlBuilding" runat="server" Height="25px" 
                          Width="180px" DataSourceID="odsBuilding" 
                          DataTextField="BuildingLabel" DataValueField="BuildingId">
                                    <asp:ListItem Value="-1">--- Choose building ---</asp:ListItem>
                        </asp:DropDownList>
                                     <asp:ObjectDataSource ID="odsBuilding" runat="server" 
                    SelectMethod="GetBuildings" TypeName="Service.ReferenceDataService">
                </asp:ObjectDataSource>
                                &nbsp;</td>
                           
                            
                                    </tr>
                                    <tr>
                            <td align="left" style="width: 165px">
                            
                                Number of month
                                <asp:Label ID="Label5" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                        </td>
                            <td align="left">
                                <asp:TextBox ID="txtNumberOfMonth" runat="server" Height="17px" Width="175px"></asp:TextBox>
                                &nbsp;
                            </td>
                             
                                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Employee<asp:Label ID="Label6" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td align="left">
                                <asp:DropDownList ID="drlEmployee" runat="server" Height="25px" 
                          Width="180px" AppendDataBoundItems="True" DataSourceID="odsITemployee" 
                          DataTextField="EmployeeName" DataValueField="EmployeeId">
                                    <asp:ListItem Value="-1">--- Choose IT employee ---</asp:ListItem>
                        </asp:DropDownList>
                        <a href="javascript:OpenFullPopupWindow('laborResourceView.aspx?employeeId=<%# DataBinder.Eval(Container.ClientID, "EmployeeId") %>')"> <img src="images/calendar.png" height="16px" style="border:none"/></a>
                       
                                     <asp:ObjectDataSource ID="odsITemployee" runat="server" 
                    SelectMethod="GetAssignedEmployees" TypeName="Service.ReferenceDataService">
                </asp:ObjectDataSource>
                                <asp:Label ID="lblRequiredEmployee" runat="server" ForeColor="Red" 
                                    Visible="False"></asp:Label>
                            </td>
                           
                            
                        </tr>
                        <tr>
                            <td align="left" style="width: 165px">
                                Maintenance category
                                <asp:Label ID="Label7" runat="server" ForeColor="Red" Text="*"></asp:Label>
                            </td>
                            <td align="left">
      
                                    <asp:UpdatePanel ID="updatePanel4" runat="server">
                                        <ContentTemplate>
                                            <asp:DropDownList ID="drlMaintenaceCategory" runat="server" 
                                                datasourceid="odsMaintenaceCategory" DataTextField="Description" 
                                                DataValueField="MaintenanceCategoryId" Height="20px" Width="180px">
                                                <asp:ListItem Value="-1">--- Choose maintenace category 
                                                ---</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:ObjectDataSource ID="odsMaintenaceCategory" runat="server" 
                                                SelectMethod="GetMaintenanceCategoryByTypeId" 
                                                TypeName="Service.PreventiveService" 
                                                OldValuesParameterFormatString="original_{0}">
                                                <SelectParameters>
                                                    <asp:ControlParameter ControlID="drlEquipmentType" Name="typeId" 
                                                        PropertyName="SelectedValue" Type="Int32" />
                                                </SelectParameters>
                                            </asp:ObjectDataSource>
                                        </ContentTemplate>
                                    </asp:UpdatePanel>
                            </td>
                           
                           
                        </tr>
                          <tr>
                              <td align="left" style="width: 165px">
                                  new category</td>
                              <td align="left">
                                  <asp:TextBox ID="txtNewCategory" runat="server" Height="37px" Width="177px"></asp:TextBox>
                              </td>
                          </tr>
                          <tr>
                              <td align="left" style="width: 165px">
                                  Start date (mm/dd/yy)&nbsp;
                                  <asp:Label ID="Label8" runat="server" ForeColor="Red" Text="*"></asp:Label>
                              </td>
                              <td align="left">
                                    <asp:TextBox ID="txtStartDate" runat="server" Width="150px"></asp:TextBox>
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/calendar.png" />
            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtStartDate" PopupButtonID="Image1">
            </cc1:CalendarExtender>
                                      
                                    <asp:Label ID="lblRequiredRequestDate" runat="server" ForeColor="Red" 
                                        Visible="false"></asp:Label>
                                  <asp:Label ID="lblRequiredStartDate" runat="server" ForeColor="Red" 
                                      Visible="False"></asp:Label>
                              </td>
                          </tr>
                        <tr>
                            <td align="left" style="width: 165px; height: 60px;">
                                Description</td>
                            <td align="left" style="height: 60px">
                                <asp:TextBox ID="txtWODescription" runat="server" Height="59px" 
                                    Width="175px"></asp:TextBox>
                            </td>
                            
                            
                             
                        </tr>
                       
                        <tr>
                            <td align="left" style="width: 165px; height: 60px;">
                                &nbsp;</td>
                            <td align="right" style="height: 60px">
                                <asp:TextBox ID="txtHiddenHaveId" runat="server" Enabled="False" Height="17px" 
                                    Width="44px" Visible="False"></asp:TextBox>
                                    <asp:TextBox ID="txtHiddenWOId" runat="server" Enabled="False" Height="17px" 
                                    Width="44px" Visible="False"></asp:TextBox>
                                <asp:TextBox ID="txtHiddenPreventiveId" runat="server" Enabled="False" Height="17px" 
                                    Visible="False" Width="44px"></asp:TextBox>
            <asp:Button ID="btnValidate" runat="server" Height="25px" Text="Validate" 
        Width="71px" CssClass="btnexpress" BorderStyle="Dotted" onclick="btnValidate_Click" />
        <br />
                                <asp:Label ID="lblInformation" runat="server" ForeColor="Red"></asp:Label>
                                &nbsp;&nbsp;&nbsp;
                            </td>     
                        </tr>
                       
                </table>
   </td>
   <td valign="top">
    <table>
        <tr><td colspan="2"><br /><br /><br /></td></tr>
        <tr>
            <td style="width: 145px" align="left" colspan="2">&nbsp;</td>
        
        </tr>
        
        <tr>  <td align="left" style="width: 145px">
                                &nbsp;</td>
                            <td align="left">
                                &nbsp;</td></tr>
        <tr> <td align="left" style="width: 145px">
                                &nbsp;</td>
                            <td align="left">
                                  &nbsp;</td></tr>
        <tr>
            <td align="left" style="width: 145px">
                                &nbsp;</td>
                            <td align="left">
                                &nbsp;</td>
                                </tr>
        <tr> <td align="left">
                                &nbsp;</td>
                            <td align="left">
                                &nbsp;</td>
         </tr>
        
            <tr>
                         <td align="left" colspan="2"> 
            
         
         
                <br /></td>
            </tr>                     
                                
                                
     </table>
     </td>
     </tr>
    </table>
   
  </asp:Panel>
</asp:Content>



